<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="com.java.service.*,java.util.*,com.java.model.UserSession,com.java.util.*"%>
<jsp:include page="common/header.jsp"></jsp:include>
<%
	UserSession usersession = (UserSession)session.getAttribute("user");
	String ent_id 			= (String)session.getAttribute("ent_id");
	
	String connGroup 	= "";
	String user_id 		= "";
	if(usersession!=null){
		connGroup 	= CmmUtil.nvl(usersession.getConnGroup(),"0");
		user_id 	= CmmUtil.nvl(usersession.getUser_id(),"");
	}
	
	HashMap map = new HashMap();
	HashMap map1 = null;
	ArrayList list = new ArrayList();
	CommonDaoService commonservice = new CommonDaoService("Com0402lp01Dao");

	map.put("user_id",user_id);
	
	list = (ArrayList)commonservice.commonDaoMethod(map);
	
	String ent_nm = "";
	String login_id = "";
	String login_nm = "";
	String login_pw = "";
	String norm_phone_no1 = "";
	String norm_phone_no2 = "";
	String norm_phone_no3 = "";
	String cell_phone_no1 = "";
	String cell_phone_no2 = "";
	String cell_phone_no3 = "";
	String email_id1 = "";
	String email_id2 = "";
	String post_no1 = "";
	String post_no2 = "";
	String post_addr = "";
	String detail_addr = "";
	String dept_cd = "";
	String class_cd = "";
	
	if(list != null){
		if(list.size() > 0){
			ent_nm = (String)((HashMap)list.get(0)).get("ent_nm");
			login_id = Crypto.DecodeBySType((String)((HashMap)list.get(0)).get("login_id"));
			login_nm = (String)((HashMap)list.get(0)).get("login_nm");
			login_pw = Crypto.DecodeBySType((String)((HashMap)list.get(0)).get("login_pw"));
			norm_phone_no1 = (String)((HashMap)list.get(0)).get("norm_phone_no1");
			norm_phone_no2 = (String)((HashMap)list.get(0)).get("norm_phone_no2");
			norm_phone_no3 = (String)((HashMap)list.get(0)).get("norm_phone_no3");
			cell_phone_no1 = (String)((HashMap)list.get(0)).get("cell_phone_no1");
			cell_phone_no2 = (String)((HashMap)list.get(0)).get("cell_phone_no2");
			cell_phone_no3 = (String)((HashMap)list.get(0)).get("cell_phone_no3");
			email_id1 = (String)((HashMap)list.get(0)).get("email_id1");
			email_id2 = (String)((HashMap)list.get(0)).get("email_id2");
			post_no1 = (String)((HashMap)list.get(0)).get("post_no1");
			post_no2 = (String)((HashMap)list.get(0)).get("post_no2");
			post_addr = (String)((HashMap)list.get(0)).get("post_addr");
			detail_addr = (String)((HashMap)list.get(0)).get("detail_addr");
			dept_cd = (String)((HashMap)list.get(0)).get("dept_cd");
			class_cd = (String)((HashMap)list.get(0)).get("class_cd");
		}
	}
	
%>
<script>
function _save(){
	var frm = document.mainfrm;
	frm.login_nm.value = frm.login_nm.value.trim();
	frm.pwd.value = frm.pwd.value.trim();
	frm.pwd2.value = frm.pwd2.value.trim();
	
	if (frm.login_nm.value == ""){
		alert("성명을 입력하십시요");
		frm.login_nm.focus();
		return;
	}else if (frm.pwd.value == ""){
		alert("비밀번호를 입력하십시요");
		frm.pwd.focus();
		return;
	}else if (frm.pwd2.value == ""){
		alert("비밀번호 확인란을 입력하십시요");
		frm.pwd2.focus();
		return;
	}else if (frm.pwd.value != frm.pwd2.value){
		alert("비밀번호가 일치 하지 않습니다. 다시 확인 하십시요");
		frm.pwd.focus();
		return;
	}
	frm.action = "/jsp/com0402l_p01_update.jsp";	
	frm.method = "post";
	frm.target = "hide_src";
	frm.submit();	
}
</script>
<body>
<form name="mainfrm" method="post">
<input type="hidden" name="blt_cont_no" value="">
<input type="hidden" name="ent_id" value="<%=ent_id %>">
<table width="992" border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td><!--top -->
    <jsp:include page="common/top_menu.jsp"></jsp:include> 
    <!-- //top -->
    <!-- contents area -->
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="180" valign="top">
    	<jsp:include page="left/com0401l_left.jsp"></jsp:include> 
    </td>
    <td width="21" valign="top">&nbsp;</td>
    <td valign="top">
    	 <table width="790px"  border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td style="font-size:14px; color:#3b70a2; font-weight:bold; border-bottom:2px solid #c8c8c8; padding:0 0 5px 0;" align="left"><img src="/images/sub_icon1.jpg"  alt="" border="0">&nbsp;기본정보관리</td>
             </tr>
        </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin:5px 0 10px 0;">
        	<tr>
            	<td align="left" width="100px" height="30px" style="font-weight:bold;font-size:13px;">기업명</td>
                <td align="left" colspan="3" width="295px"> <%=ent_nm %></td>
            </tr>
            <tr>
              <td colspan="4" style="padding:5px 0 5px 0;" align="left"><img src="/images/line_member.gif"  alt="" border="0"></td>
            </tr>
			<tr>
                <td align="left" width="100px" style="font-weight:bold;font-size:13px;">성명</td>
                <td align="left" ><input type="text" name="login_nm" size="10" maxlength="10" required="required" value="<%=login_nm %>" hname="성명" /></td>
            	<td align="left" width="100px" style="font-weight:bold;font-size:13px;">아이디</td>
                <td align="left" width="295px"><%=login_id %></td>
            </tr>
            <tr>
              <td colspan="4" style="padding:5px 0 5px 0;" align="left"><img src="/images/line_member.gif"  alt="" border="0"></td>
            </tr>
            <tr>
            	<td align="left" width="100px" style="font-weight:bold;font-size:13px;">비밀번호</td>
                <td align="left" width="295px"><input type="password" name="pwd" size="15" maxlength="10" required="required" value="<%=login_pw %>" hname="비밀번호" /></td>
            	<td align="left" width="100px" style="font-weight:bold;font-size:13px;">비밀번호 확인</td>
                <td align="left" width="295px"><input type="password" name="pwd2" size="15" maxlength="10" required="required" value="<%=login_pw %>" hname="비밀번호" /></td>
            </tr>
           <tr>
              <td colspan="4" style="padding:5px 0 5px 0;" align="left"><img src="/images/line_member.gif"  alt="" border="0"></td>
            </tr>
        	<tr>
            	<td align="left" width="100px" style="font-weight:bold;font-size:13px;">전화번호</td>
                <td align="left" width="295px">
					<input type="text" name="norm_phone_no1" value="<%=norm_phone_no1 %>" class="basicinfoTEXT" maxlength="3" required="required" hname="전화번호1" /> -
                    <input type="text" name="norm_phone_no2" value="<%=norm_phone_no2 %>" class="basicinfoTEXT" maxlength="4" required="required" hname="전화번호2" /> -
                    <input type="text" name="norm_phone_no3" value="<%=norm_phone_no3 %>" class="basicinfoTEXT" maxlength="4" required="required" hname="전화번호3" />
				</td>
                <td align="left" width="100px" style="font-weight:bold;font-size:13px;">핸드폰번호</td>
                <td align="left" >
					<input type="text" name="cell_phone_no1" value="<%=cell_phone_no1 %>" class="basicinfoTEXT" maxlength="3" required="required" hname="전화번호1" /> -
                    <input type="text" name="cell_phone_no2" value="<%=cell_phone_no2 %>" class="basicinfoTEXT" maxlength="4" required="required" hname="전화번호2" /> -
                    <input type="text" name="cell_phone_no3" value="<%=cell_phone_no3 %>" class="basicinfoTEXT" maxlength="4" required="required" hname="전화번호3" />
                </td>
            </tr>
            <tr>
              <td colspan="4" style="padding:5px 0 5px 0;" align="left"><img src="/images/line_member.gif"  alt="" border="0"></td>
            </tr>
        	<tr>
            	<td align="left" width="100px" style="font-weight:bold;font-size:13px;">메일주소</td>
                <td align="left" width="295px" colspan="3"><input type="text" name="email_id1" value="" size="10" runat="server" id="txtZipCode1" maxlength="15"/>@<input type="text" name="email_id2" value="<%=email_id2 %>" size="15" runat="server" id="txtZipCode2" maxlength="15" /></td>
            </tr>
            <tr>
              <td colspan="4" style="padding:5px 0 5px 0;" align="left"><img src="/images/line_member.gif"  alt="" border="0"></td>
            </tr>
        	<tr>
            	<td align="left" width="100px" style="font-weight:bold;font-size:13px;">우편번호</td>
                <td align="left" width="295px" colspan="3"><input type="text" name="post_no1" value="<%=post_no1%>" class="w55" id="txtZipCode1" maxlength="3"/>-<input type="text" name="post_no2" value="<%=post_no2 %>" class="w55"  id="txtZipCode2" maxlength="3" /></td>
            </tr>
            <tr>
              <td colspan="4" style="padding:5px 0 5px 0;" align="left"><img src="/images/line_member.gif"  alt="" border="0"></td>
            </tr>
            <tr>
            	<td align="left"  width="100px" style="font-weight:bold;font-size:13px;">주소</td>
                <td align="left" colspan="3" width="295px">
                	<input type="text" name="post_addr" value="<%=post_addr %>" class="w495" runat="server" id="txtAddr1" /><br />
                        <input type="text" name="detail_addr" value="<%=detail_addr %>" maxlength="100" class="w495" runat="server" id="txtAddr2" maxlength="50"/>
                </td>
            </tr>
            <tr>
            	<td align="right" colspan="4" style=""><input name="button2" type="button" class="btn_pink_s_w71" onclick="javascript:_save();" value="확인" /></td>
            </tr>
                   
        </table>
  
	</td>
  </tr>
</table>
   
    <jsp:include page="common/footer.jsp"></jsp:include>
        </tr>
    </table>
	</td>
  </tr>
</table>
<iframe name='hide_src'  width='0' height='0' SCROLLING='AUTO' frameborder='0'></iframe>
</form>
</body>
</html>
